import 'package:flutter_kit_dsp/flutter_kit_dsp.dart';
import 'package:get/get.dart';

class MyCrossoverController extends CrossoverController {
  late final RxList<GroupModel> groupList;
  @override
  void onInit() {
    super.onInit();
    final list = globalController.rxModel.value.ch_list;
    groupList = List.generate((list.length / 2).toInt(), (index) {
      final model = GroupModel(ch1: list[2 * index], ch2: list[2 * index + 1]);
      model.select = model.ch1!.select && model.ch2!.select;
      return model;
    }).obs;
  }
}
